package com.ming.controller;

import com.ming.model.User;
import com.ming.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/users")
public class UserController {
    @Autowired
    private UserRepository userRepository;

    @RequestMapping()
    public List<User> selectUserList(){
       return userRepository.findAll();
    }

}
